#include "mainwindow.h"
#include "ui_mainwindow.h"
#include<QPainter>
#include<QTimer>
#include"mypushbutton.h"
#include"extract.h"

MainWindow::MainWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    setWindowTitle("krypton-gold-simulator");
    setWindowIcon(QIcon(":/kgs/timg.jpg"));
    setFixedSize(1870,1052);
    //开始按钮
    myPushButton * start = new myPushButton(":/kgs/003.png",":/kgs/004.png");
    start->setParent(this);
    start->move(1341,893);

    extract * ex=new extract;//抽卡界面

    connect(start,&myPushButton::clicked,this,[=](){
        QTimer::singleShot(500,this,[=]()
        {
            this->hide();
            ex->show();
        });

    });
}

void MainWindow::paintEvent(QPaintEvent *)
{
    QPainter painter(this);
    QPixmap pix;
    pix.load(":/kgs/2 (2).png");
    painter.drawPixmap(0,0,pix);

}

MainWindow::~MainWindow()
{
    delete ui;
}

